import request from '@/utils/request'
// 搜索
export const getlist = params => request.get('/api/goods/pageDetail', { params })
// 新增
export const add = (data) => request.post('api/goods', data)
// 获取货品id
export const getCode = () => request.get('api/codeFactory/next/HP')
// 模糊查询货品
export const getgoodstype = () => request.get('api/goods/vague?params=')
// 货主
export const getownername = () => request.get('api/owner/vague?params=')
// 编辑回显  详情
export const detail = (id) => request.get(`/api/goods/${id}`)
// edit
export const put = (data) => request.put('api/goods', data)
// del
export const del = (id) => request.delete('/api/goods', { params: { 'ids[]': id } })
